/***********************************************************************//**
 *   \file FilterEqualizer.h		\author belot nicolas (karrakis)           
 *   \brief define an Equalizer
     Apply an Equalizer via a DFT		                                   
 ************************************************************************//*
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#ifndef FILTER_EQUALIZER_H
#define FILTER_EQUALIZER_H 1
#include "libtrckr.h"
#include "FilterDFT.h"
namespace libtrckr {
class FilterEqualizer : public FilterDFT {
	/** \class libtrckr::FilterEqualizer
	\brief Apply an Equalizer via a DFT
	*/
	public :
		/** Default Constructor */
		FilterEqualizer();
		/** Copy Contructor */
		FilterEqualizer(const FilterEqualizer&);
		/** Destructor */
		~FilterEqualizer();
		/** Initialise the Filter */
		void Init();
		/** Tune the filter 
		\param conf configuration, take i=>gain in db, i+1 frequency.
		*/
		void Tune(DynArray<int>);
		Buffer& Preview(Buffer &);
		double* Preview(double*, int);
		string HowToTune();
	private:
		unsigned int size;
		double *eqy;
		double *eqx;
		double bitrate;
		size_t csize;
};

}
#endif

